﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;

public class testsheet : MonoBehaviour
{
    public GameObject audioTrack;
    // Start is called before the first frame update
    void Start()
    {
        test();
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    public void test()
    {
        ReadText();
        //Debug.Log(notes[0]);
        audioTrack.GetComponent<AudioSource>().PlayOneShot(Resources.Load<AudioClip>("sheet/" + GlobalSettings.Instance.notes[0]));
        float startTime = Time.time;
        Debug.Log("start time:"+ startTime);
    }
    private void ReadText()
    {
        string path = Application.dataPath + "/Resources/sheet/sheet.txt";
        GlobalSettings.Instance.notes = File.ReadAllLines(path);
    }

    public void testButton()
    {
        Debug.Log("note time:" + Time.time);
    }
}
